package HomeWork;

import java.io.*;

public class Test01 {
    public static void main(String[] args) {
        completeDate();
    }
    public static void completeDate() {
        FileInputStream fis = null;
        FileOutputStream fos = null ;
        try {
            File file = new File("F://1.txt");
            fis = new FileInputStream(file);
            /*InputStreamReader isr = new InputStreamReader(fis);*/
            FileReader fr = new FileReader("F://1.txt");
            fos = new FileOutputStream("F://2.txt");
            byte[] bytes = new byte[1024];
            int i = 0;
            while ((i = fis.read(bytes)) != -1){
                System.out.println(new String(bytes,0,i));
            }
        } catch (FileNotFoundException e) {
            e.printStackTrace();
        } catch (IOException e) {
            e.printStackTrace();
        } finally {
            try {
               if (fis != null){
                   fis.close();
                }
            } catch (IOException e) {
                e.printStackTrace();
            }
        }
    }
}
